include ../../config.mk

target = index.cgi
objs = index.o
SUBTGT = all
INCLUDE = -I../core/include
libs +=-L./controllers -lcontrollers
libs += -L./views -lviews
libs += -L../core -lcore
.PHONY: all clean install distclean subdir $(SUBDIR)
all:$(target) subdir

clean: 
	$(RM) $(target) $(objs)
	$(MAKE) $(SUBDIR) SUBTGT=$@

install:index.cgi
	cp -f index.cgi $(INSTALL_TARGET)

index.o:controllers #views
index.cgi:index.o
	$(CC) $< -o $@ $(libs)

controllers:views
subdir:$(SUBDIR)
$(SUBDIR):
	$(MAKE) -C $@ $(SUBTGT)
